openFile

By default, FileProvider automatically returns the ParcelFileDescriptor for a file associated with a content://Uri. To get the ParcelFileDescriptor, call ContentResolver.openFileDescriptor. To override this method, you must provide your own subclass of FileProvider.

Return

A new ParcelFileDescriptor with which you can access the file.

Parameters

uri

A content URI associated with a file, as returned by getUriForFile().

mode

Access mode for the file. May be "r" for read-only access, "rw" for read and write access, or "rwt" for read and write access that truncates any existing file.